
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>deepseek整合Java实现本地化人工智能 - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>deepseek整合Java实现本地化人工智能 - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">特性</div>
          <div class="card-question">根据文档，DeepSeek大语言模型在本地化部署方面具备哪些主要优势？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">特性</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">DeepSeek的主要优势包括：1. 高性能，尤其在代码生成和数学推理领域；2. 支持通过Ollama等工具进行本地部署，减少对云服务的依赖；3. 其API与OpenAI接口兼容，便于集成；4. 作为开源模型，具有很高的成本效益。</div>
          </div>
          <div class="card-source">来源: 一、DeepSeek 简介</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">实践</div>
          <div class="card-question">如何使用Ollama工具在本地环境中拉取并运行DeepSeek模型？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">实践</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">首先，在终端中执行`ollama pull deepseek`命令来拉取模型。模型下载完成后，再执行`ollama run deepseek`命令来启动模型服务。</div>
          </div>
          <div class="card-source">来源: 二、准备工作 - 2. 安装Ollama并部署DeepSeek</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">配置</div>
          <div class="card-question">当通过Ollama成功部署DeepSeek后，其API服务默认监听的本地地址和端口是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">配置</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">默认情况下，Ollama会在本地监听 `http://localhost:11434` 地址，并在此地址提供API接口。</div>
          </div>
          <div class="card-source">来源: 二、准备工作 - 2. 安装Ollama并部署DeepSeek</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">在创建一个用于整合DeepSeek的Spring Boot项目时，文档推荐添加哪三类核心依赖？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">文档推荐添加的核心依赖包括：1. Spring Web，用于构建RESTful API；2. Lombok，用于简化Java代码；3. 一个HTTP客户端，例如OkHttp或WebClient，用于向Ollama API发送请求。</div>
          </div>
          <div class="card-source">来源: 三、Java整合DeepSeek - 1. 创建Spring Boot项目</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">为什么文档建议对与DeepSeek模型的交互进行异步处理？并推荐了哪种技术来实现？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">因为对于大型模型或复杂任务，异步处理能够提高系统性能。文档推荐使用Spring的`WebClient`作为异步HTTP客户端来实现这一目标。</div>
          </div>
          <div class="card-source">来源: 四、优化与扩展 - 1. 异步处理</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">理论</div>
          <div class="card-question">在本地部署DeepSeek时，需要重点关注哪三个方面的注意事项？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">理论</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">需要关注的三个注意事项是：1. 硬件需求，建议使用配备GPU的服务器或高性能CPU及至少16GB内存；2. 数据隐私，确保模型权重和输入数据的安全存储；3. 模型更新，定期检查Ollama和DeepSeek的更新。</div>
          </div>
          <div class="card-source">来源: 六、注意事项</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
